﻿{%MainUnit extFileUtils.pas}
{
 extUtils
 --------
 Additional various routine which not yet available and/or not yet fixed on Lazarus v1.0.x
 
 This Unit is Part of GauExtUtils Package Component for Lazarus.
 Code name Package		: H-Băng
 Branch name Package	: Anh Giờ Đây
 Last Updated			: 3:18 PM 14/06/2013 (GMT+07)

 Copyright (c) 2012 - 2013, Takeda Matsuki and others
 License : Modified LGPL (follow Lazarus license). 
}
 
{------------------------------------------------------------------------------
extFileAgeUTF8
------------------------------------------------------------------------------}
function extFileAgeUTF8(const FileName: String): Longint;
begin
 Result:=SysUtils.FileAge(UTF8ToSys(Filename));
end;

{------------------------------------------------------------------------------
extFileSetDateUTF8
------------------------------------------------------------------------------}
function extFileSetDateUTF8(const FileName: String; Age: Longint): Longint;
begin
 Result:=SysUtils.FileSetDate(UTF8ToSys(Filename),Age);
end;
{---------------------------------------------------------------------------------------------------} 

{------------------------------------------------------------------------------
extIsFileExists
------------------------------------------------------------------------------}
function extIsFileExists (Const FileName : String) : Boolean;
begin
 Result:=SysUtils.FileExists(UTF8ToSys(FileName));
end;

{------------------------------------------------------------------------------
extIsDirectoryExists
------------------------------------------------------------------------------}
function extIsDirectoryExists (const Directory : String) : Boolean;
begin
 Result:=SysUtils.DirectoryExists(UTF8ToSys(Directory));
end;

function extGetCurDirUTF8 : String;
begin
  Result:=SysToUTF8(SysUtils.GetCurrentDir);
end;

procedure InitUtils;
begin
 // Set Empty for now!~
end;  
